__author__ = 'chenglin'
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    FLASKY_MAIL_SUBJECT_PREFIX = '[Flasky]'
    FLASKY_MAIL_SENDER = 'Flasky Admin <flasky@example.com>'
    FLASKY_ADMIN = os.environ.get('FLASKY_ADMIN')
    @staticmethod
    def init_app(app):
        pass

class DefaultConfig(Config):
    """
    Default configuration for a newsmeme application.
    """

    DEBUG = True

    # change this in your production settings !!!

    SECRET_KEY = "secret"

    # keys for localhost. Change as appropriate.

    RECAPTCHA_PUBLIC_KEY = '6LeYIbsSAAAAACRPIllxA7wvXjIE411PfdB2gt2J'
    RECAPTCHA_PRIVATE_KEY = '6LeYIbsSAAAAAJezaIq3Ft_hSTo0YtyeFG-JgRtu'

    SQLALCHEMY_DATABASE_URI = "sqlite:///newsmeme.db"

    SQLALCHEMY_ECHO = False

    MAIL_DEBUG = DEBUG

    ADMINS = ()

    DEFAULT_MAIL_SENDER = "support@thenewsmeme.com"

    ACCEPT_LANGUAGES = ['en', 'fi']

    DEBUG_LOG = 'logs/debug.log'
    ERROR_LOG = 'logs/error.log'

    CACHE_TYPE = "simple"
    CACHE_DEFAULT_TIMEOUT = 300

config={
    'default':DefaultConfig,
    'default2':DefaultConfig
}